import { get, post } from '@/utils/request'

const BASE_URL = window.baseUrl.icp

// 分页查询
export function pageList(query) {
  return get(BASE_URL + '/approve/access/pageList', query)
}

// 批量删除审批信息
export function deleteList(ids) {
  return post(BASE_URL + '/approve/access/delete?ids=' + ids)
}
// 保存或更新
export function saveOrUpdate(query) {
  return post(BASE_URL + '/approve/access/saveOrUpdate', query)
}
//   根据ID查询详情
export function queryById(query) {
  return get(BASE_URL + '/approve/access/' + query)
}
// 下载导入模板
export function template(query) {
  return get(BASE_URL + '/approve/access/template', query)
}
//   导入
export function importData(query) {
  return post(BASE_URL + '/approve/access/importData', query)
}
//   导出

export function exportFile(query) {
  return get(BASE_URL + '/approve/access/export', query)
}
// 根据掩码位和IP获取网络信息
export function getByMaskBit(query) {
  return get(BASE_URL + '/approve/access/getByMaskBit', query)
}
// 获取字典值
export function listByTypes(ids) {
  return get('/assets-api/dictItems/listByTypes', { ids })
}

// 获取终端树

export function getTerminalTree(query) {
  return get(BASE_URL + '/approve/operate/getTerminalTree', query)
}
// 获取运维对象类型
export function getOperationType(query) {
  return get(BASE_URL + '/approve/operate/getOperationType', query)
}
